
<template>
	<el-dialog title="评价"  visible :show-close="false" :modal-append-to-body="false" class="wrap" size="tiny">
		<i class="el-icon-close close" @click="cancel"></i>
				<div>
					<el-row :gutter="20">
					  <el-col :span="15"><div class="grid-content bg-purple">评价：&nbsp;&nbsp;{{form.bjmc}}&nbsp;&nbsp; &nbsp;{{form.day}}&nbsp;&nbsp;&nbsp; {{form.name}}</div></el-col>
					  <!-- <el-col :span="6"><div class="grid-content bg-purple">{{form.day}}</div></el-col>
					  <el-col :span="6"><div class="grid-content bg-purple">{{form.name}}</div></el-col> -->
					</el-row>
					<el-checkbox-group v-model="checkList" class="check1">
					 <el-checkbox class="check" label="复选框 A">表现优异</el-checkbox>
					 <el-checkbox class="check"  label="复选框 B">上课专心</el-checkbox>
					 <el-checkbox class="check" label="复选框 C">乐于参与</el-checkbox>
					 <el-checkbox class="check" label="复选框 A">守秩序</el-checkbox>
					 <el-checkbox class="check" label="复选框 B">有进步</el-checkbox>
				 </el-checkbox-group>
				</div>
				<div>
					<el-row :gutter="20">
					  <el-col :span="8"><div class="grid-content bg-purple">需要加强</div></el-col>
					</el-row>
					<el-checkbox-group v-model="checkList" class="check1">
					 <el-checkbox class="check2" label="复选框 A">专注度</el-checkbox>
					 <el-checkbox class="check2" label="复选框 B">写</el-checkbox>
					 <el-checkbox class="check2" label="复选框 C">拼字</el-checkbox>
					 <el-checkbox class="check2" label="复选框 A">句型</el-checkbox>
					 <el-checkbox class="check2" label="复选框 B">读</el-checkbox>
					 <el-checkbox class="check2" label="复选框 B">字母拼写</el-checkbox>
					 <el-checkbox class="check2" label="复选框 B">听说</el-checkbox>
					 <el-checkbox class="check2" label="复选框 B">留言</el-checkbox>
				 </el-checkbox-group>
				</div>
		<el-button type="info" class="submit" @click="submit">确定</el-button>
	</el-dialog>
</template>

<script type="text/javascript">
	import qs from 'qs'
	export default {
		props: ['params'],
		data() {
			return {
				checkList	:[],

			}
		},
		created() {
			console.log(this.params)

           this.form=this.params.row;
//			this.loadinfo();
		},
		methods: {
			submit() {
           console.log(this.params)
            var time1 = this.$.getLocalTimeNo0(Date.parse(this.form.bksj));
				//检测
				this.$store.state.loading = true;
				//装载数据
				var logininfo = JSON.parse(localStorage.logininfo);
				var params2 = qs.stringify({
					bkyy: this.form.bkyy+'',
					bksj: this.time1+'',
					day:  this.params.row.lx+'',
					bjid: this.params.row.bjmc,
					type: this.form.type+'',
					xsid: this.params.row.xsid,
					lsid: this.params.row.lsid,
					yhid: logininfo.id+'',
					xxid: logininfo.xxid+''
				})
				//执行
				this.axios.post(this.$store.state.api + 'ls/updateaddbk', params2)
					.then(res => {
						if(res.data.code == 1) {
							this.$emit('close', { type: 'pjadd', cancel: false });
							this.$store.state.loading = false;
						} else {
							this.$emit('close', { type: 'pjadd', cancel: false });
							this.$store.state.loading = false;
						}
					}).catch(res => {
						this.$message.warning("服务器异常");
						this.$store.state.loading = false;
					})
			},
			cancel() {
				this.$emit('close', { type: 'pjadd', cancel: false })
			}
		}
	}
</script>

<style lang="less" scoped>
	.wrap {
		text-align: center;
	}
	.check{
		width: 40%;
		height: 30px;
		// line-height: 30px;
		text-align: left;
		margin-left: 10px;
	}
	.check1{
		text-align: left;
	}
	.check2{
		width: 40%;
		height: 30px;
		// line-height: 30px;
		text-align: left;
		margin-left: 10px;
	}
	.form {
		text-align: left;
	}
	 .input {
            width: 300px;
            display: inline-block;
        }

	.select-block {
		display: block;
	}

	.submit {
		width: 120px;
		margin-top: 20px;
	}
	.el-row {
    margin-bottom: 20px;
    &:last-child {
      margin-bottom: 0;
    }
  }
  .el-col {
    border-radius: 4px;
		// margin-top: 20px;
  }
  .bg-purple-dark {
    background: #99a9bf;
  }
  .bg-purple {
    background: #d3dce6;
  }
  .bg-purple-light {
    background: #e5e9f2;
  }
  .grid-content {
    border-radius: 4px;
    min-height: 25px;
		line-height: 25px;
  }
  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
</style>
